package com.wit.witmg.api;


import com.wit.witmg.service.ITPatentfeeService;
import com.wit.witmg.service.ITPollingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 轮询启用表 前端控制器
 * </p>
 *
 * @author bob
 * @since 2025-10-20
 */
@RestController
@RequestMapping("polling")
@Api(tags = "轮循任务API")
public class PollingController {
    @Resource
    private ITPollingService service;

    @ApiOperation("新增")
    @PostMapping("add")
    public Object add(HttpServletRequest request,
                         @RequestParam("json") String json) {
        return service.add(request,json);
    }

    @ApiOperation("查询")
    @PostMapping("get")
    public Object get(HttpServletRequest request) {
        return service.get(request);
    }
}
